#ifndef REPLACEDIALOG_H
#define REPLACEDIALOG_H

#include <QDialog>
#include <QMouseEvent>

namespace Ui {
class ReplaceDialog;
}

class ReplaceDialog : public QDialog
{
    Q_OBJECT

public:
    explicit ReplaceDialog(QWidget *parent = nullptr);
    ~ReplaceDialog();
    void initial();

private slots:
    void on_findNextBtn_clicked();
    void on_replaceBtn_clicked();

    void on_closeBtn_clicked();

    void on_cancelBtn_clicked();

    void btnEnable();
protected:
    void mousePressEvent(QMouseEvent *event) override;
    void mouseMoveEvent(QMouseEvent *event) override;
signals:
    void searchNextText(const QString &text,bool isCaseSenitive,bool isloop,bool direction);
    void replaceText(const QString &findNextText,const QString &replaceText,bool isCaseSenitive,bool isloop,bool direction);
private:
    Ui::ReplaceDialog *ui;
    QPoint m_dragPos;
};

#endif // REPLACEDIALOG_H
